<?php
require_once($_SERVER['DOCUMENT_ROOT'] . '/../start.php');//Подключаем файл инициализации


foreach ($_POST['arrIds'] as $file)
	$arrFolders[] = intval($file[0]);

$objMain = new Main();
$objMain->deleteFolder($arrFolders);

$objViewMain = new View_Main();
$arrFolders = Main::getFolders();
$arrTree = Service_Array::convertLinealToTree($arrFolders);
$objViewMain->getTree($arrTree);

echo json_encode($objViewMain->str);
?> 
	